package com.nt.train.service.demo;

import com.nt.train.service.IDemoService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;

/**
 * 在上海环境下这样实现，比如：
 * @author hlf
 * @version 1.0
 * @date 2022/8/3 16:45
 */
@Component
@ConditionalOnProperty(value="deploy.province",havingValue = "shanghai")
public class DemoServiceShanghai implements IDemoService {
    @Override
    public void doSomething() {System.out.println("上海的业务实现");}
}
